package com.game.primitive.context;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * 生成一个id，保证不重复
 * Created by lizhiwei on 2016/4/5.
 */
public class IdGen {
	private static AtomicInteger ai = new AtomicInteger();

	/**
	 * 得到一个TableId，保证不重复
	 *
	 * @return
	 */
	public static int getId() {
		return ai.incrementAndGet();
	}
}
